package org.celery.modules.goods.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GoodsStatusEnum {
    STANDBY("待上架", 1),

    REJECT("下架", 2),

    VERIFIED("上架", 3),
    ;
    private String name;
    private int status;

    public static String getName(int status) {
        if (status == STANDBY.getStatus()) {
            return STANDBY.getName();
        } else if (status == REJECT.getStatus()) {
            return REJECT.getName();
        } else if (status == VERIFIED.getStatus()) {
            return VERIFIED.getName();
        } else {
            return "";
        }
    }

}
